package com.itheima.demo;

public class Fibonacci {
    public static void main(String[] args) {
        Long number = getFibonacci(49);
        System.out.println(number);
    }

    private static Long getFibonacci(int i) {
        if (i == 1 || i==2){
            return 1L;
        }else {
            return getFibonacci(i-1)+getFibonacci(i-2);
        }
    }
}
